package com.fresh.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 生鲜商品
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
public class FreshGoods implements Serializable {

  private Long id;
  private String name;
  private Integer unitId;
  private String number;
  private BigDecimal lossRate;
  private Integer categoryId;
  private Integer unitWeight;
  private Integer supplierId;
  private String pic;
  private String description;
  @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime updateTime;
  private String status;
  private BigDecimal price;
  private Integer stock;
  private Integer stockMax;
  private Integer stockMin;
  private String type;

}
